package com.dean.sql;

import com.dean.utils.DeanDbUrlUtils;

/**
 * @ClassName SqlDriverEnum
 * @Description
 * @Date 2022/1/1 21:53
 * @Created by dean
 */
public enum DataBaseTypeEnum {
    ORALCE,MYSQL,POSTGRESQL,SQLSERVER,SQLITE;
    public static DataBaseTypeEnum get(String url){
        String dbType = DeanDbUrlUtils.getHostFromUrl(url).getDbType();
        return DataBaseTypeEnum.valueOf(dbType.toUpperCase());
    }
}
